﻿@using FruitCake.SimpleGallery.Models;

@{
    IEnumerable<SimpleGalleryImage> images = null;
    var count = 0;
    
    if(Model.Images != null)
    {
        images = (IEnumerable<SimpleGalleryImage>) Model.Images;
        count = images.Count();
    }
}
<p>@T("SimpleGallery: {0} ({1} images)", Model.ContentPart.Path, count).ToString()</p>
@if(count>0) {
    foreach(SimpleGalleryImage img in images.Take(5)) {
        <p><img src="@img.ThumbnailResolvedPath" style="max-width: 120px; max-height:100px;" /></p>
    }
}